package com.wash.shoes.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wash.shoes.domain.vo.CustomerCouponVo;
import com.wash.shoes.entity.CouponPo;
import com.wash.shoes.entity.CustomerCouponPo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author ljg
 * @since 2024-12-01
 */
public interface CustomerCouponMapper extends BaseMapper<CustomerCouponPo> {

    /**
     * 列表的数据
     *
     * @param page             分页的查询
     * @param customerCouponVo 用户的信息
     * @return
     */
    List<CustomerCouponVo> pageList(@Param("page") Page<CustomerCouponVo> page, @Param("customerCouponVo") CustomerCouponVo customerCouponVo);

    /**
     * 用户的优惠卷
     *
     * @param customerId
     * @param couponId
     * @return
     */
    List<CustomerCouponPo> getUserCouponCount(@Param("customerId") String customerId, @Param("couponId") String couponId);

    /**
     * @author lijianguo
     * @Date 07/12/2024
     * 获取优惠券
     **/
    CustomerCouponPo getByOrderId(@Param("orderId") String orderId);

    /**
     * @param customerId
     * @param id
     * @return
     */
    CustomerCouponPo getByInfo(@Param("customerId") String customerId, @Param("id") String couponId);
}
